package cn.entity;

import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 首页动态
 */
@Data
public class News{
    private Integer id;

    private String title;

    private String postDate;

    public void setPostDate(Date postDate) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        this.postDate = format.format(postDate);//设置发布日期
//        this.postDate = postDate;
    }
}